package com.example.my.meila.presenter;

import com.example.my.meila.api.BaseSubscriber;
import com.example.my.meila.api.ExceptionHandle;
import com.example.my.meila.entity.MakeUp;
import com.example.my.meila.model.ModelFactory;
import com.example.my.meila.view.impl.MakeUpView;

/**
 * Created by My on 2016/10/31.
 */
public class MakeUpPresenter {

    public MakeUpView makeUpView;

    public MakeUpPresenter(MakeUpView makeUpView) {
        this.makeUpView = makeUpView;
    }


    public void getMakeUpData(){

        ModelFactory.getiMakeUpModel().getMakeUpData(new BaseSubscriber<MakeUp>() {
            @Override
            public void onSuccess(MakeUp make) {
                makeUpView.onSuccess( make);

            }

            @Override
            public void onFail(ExceptionHandle.ResponeThrowable e) {
                makeUpView.onFail(e);

            }

            @Override
            public void onFinished() {
                makeUpView.onFinish();

            }
        });
    }
}
